GtkApplication: change the accel prefix we use
authorRyan Lortie <desrt@desrt.ca>
Fri, 20 Jan 2012 18:56:02 +0000 (13:56 -0500)
committerRyan Lortie <desrt@desrt.ca>
Mon, 23 Jan 2012 16:17:07 +0000 (11:17 -0500)
GtkApplication adds to the global accel map using the prefix <Actions>
which is also used by GtkAction.  This causes GtkApplicationWindow to
try to parse GtkAction-added accels as if they were its own (which
fails).

Switch to a different namespace -- <GAction>/.

https://bugzilla.gnome.org/show_bug.cgi?id=668367

gtk/gtkaccelmap.c
gtk/gtkapplicationwindow.c

index 2f33b92c660c849f771442d1cd2c26a8091642e1..2b921451560f3646bd3712fe02226a8e7f3555e4 100644 (file)
@@ -1073,7 +1073,7 @@ _gtk_accel_path_for_action (const gchar *action_name,
 {
   GString *s;
 
-  s = g_string_new ("<Actions>/");
+  s = g_string_new ("<GAction>/");
   g_string_append (s, action_name);
   if (parameter)
     {
index 4d901d51ff182e0c3f138fa38967f4110a573c22..fabf8ef6d2b8a4bb105b4b804165ab364bc3d8a9 100644 (file)
@@ -375,10 +375,10 @@ add_accel_closure (gpointer         data,
   if (accel_key == 0)
     return;
 
-  if (!g_str_has_prefix (accel_path, "<Actions>/"))
+  if (!g_str_has_prefix (accel_path, "<GAction>/"))
     return;
 
-  path = accel_path + strlen ("<Actions>/");
+  path = accel_path + strlen ("<GAction>/");
   p = strchr (path, '/');
   if (p)
     {